#include "common.h"

void *memset(void *b, int c, size_t len) {
    for (size_t i = 0; i < len; i++) {
        ((u8 *)b)[i] = c;
    }
    return b;
}

void *memcpy(void *dst, const void *src, size_t len) {
    for (size_t i = 0; i < len; i++) {
        ((u8 *)dst)[i] = ((u8 *)src)[i];
    }
    return dst;
}

size_t strlen(const char *str) {
    const char *p = str;
    while (*p != '\0') {
        p++;
    }
    return p - str;
}
